package com.lsq.baseadmin.modules.maintenance.controller;


import com.github.pagehelper.PageInfo;
import com.lsq.baseadmin.modules.maintenance.entity.ScheduleJobLog;
import com.lsq.baseadmin.modules.maintenance.service.ScheduleJobLogService;
import io.swagger.annotations.ApiOperation;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author lsq
 * @since 2020-11-11
 */
@RestController
@RequestMapping("/scheduleJobLog")
public class ScheduleJobLogController {

    private ScheduleJobLogService scheduleJobLogService;

    @ApiOperation("查询任务执行日志")
    @GetMapping(value = "/list")
    public ResponseEntity<Object> list(ScheduleJobLog entity, int pageNum, int pageSize) {
        PageInfo pg = scheduleJobLogService.pg(entity, pageNum, pageSize);
        return ResponseEntity.ok(pg);
    }

    @Resource
    public void setScheduleJobLogService(ScheduleJobLogService scheduleJobLogService) {
        this.scheduleJobLogService = scheduleJobLogService;
    }
}
